using Pay.Data;
using System;

namespace Pay.Service {
	public class ServiceBase : IDisposable {
		protected PayContext context;

		public ServiceBase(IUnitOfWork iUnitOfWork) {
			context = iUnitOfWork.Context as PayContext;
		}

		public void Dispose() {
			if (this.context != null) {
				this.context.Dispose();
			}
		}
	}

	public class ServiceBase2 : IDisposable {
		protected PayContext context;

		public ServiceBase2(IUnitOfWork iUnitOfWork) {
			context = iUnitOfWork.Context as PayContext;
		}

		public void Dispose() {
			if (this.context != null) {
				this.context.Dispose();
			}
		}
	}
}

